module TagsHelper
  def taggings_column(record)
    record.taggings.collect do |t|
      case t.taggable_type
      when 'Image'
        image_preview(t.taggable)
      when 'Template'
        template_preview(t.taggable)
      end
    end
  end

  def images_column(record)
    images_list(record.images)
  end

  def templates_column(record)
    templates_list(record.templates)
  end

  def hymns_column(record)
    hymns_list(record.hymns)
  end
end
